﻿Public Class clCasillaTierra : Inherits clCasilla : Implements IEquatable(Of clCasillaTierra)
    'Public Sub New()
    '    Dim imagen As New PictureBox
    '    imagen.BackgroundImage.FromFile = ImagenPredeterminada
    '    MyBase.New(ElSuelo.Accesible, imagen)
    'End Sub
    Public Sub New(ByVal Objeto As Control)
        MyBase.New(ElSuelo.Accesible, Objeto)
        ImagenPredeterminada = My.Resources.suelo
        If Objeto.GetType = GetType(PictureBox) Then
            TryCast(Objeto, PictureBox).BackgroundImage = ImagenPredeterminada
        End If
    End Sub
    Public Overloads Function Equals(ByVal Tierra As clCasillaTierra) As Boolean Implements System.IEquatable(Of clCasillaTierra).Equals
        Return clCasilla.Equals(Me, Tierra)
    End Function
    Public Overloads Shared Function Equals(ByVal TierraA As clCasillaTierra, ByVal TierraB As clCasillaTierra) As Boolean
        Return TierraA.GetType = TierraB.GetType And TierraA.Control.Name = TierraB.Control.Name
    End Function
End Class